<script>
    import {init} from '@/common/global.js';
	export default {
		onLaunch: function() {
            init({
                _this: this
            });
			console.log('App Launch', this)
            let phone = uni.getStorageSync('phone')
            let userName = uni.getStorageSync('userName')
            let src = uni.getStorageSync('src')
            let token = uni.getStorageSync('token')
            this.$updateParams(['personInfo', {phone: phone}])
            this.$updateParams(['personInfo', {userName: userName ? userName : '游客'}])
            this.$updateParams(['personInfo', {src: src}])
            this.$updateParams(['personInfo', {token: token}])
            if(token != '') {
                this.$updateParams(['loginStatus', true])
            }
            console.log('this.$sotre.state.personInfo', this.$store.state.personInfo, phone)
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
    /* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
    @import "uview-ui/index.scss";
    page {
        background: #f1f1f1;
    }
    .loading {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .more,
    .noMore {
        font-size: 24rpx;
        text-align: center;
        margin: 8rpx 0;
    }
</style>
